<%--
  Created by IntelliJ IDEA.
  User: yangyaru
  Date: 2022/4/12
  Time: 9:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/admin/business/update" method="post">
    <p>编号：${business.id}<input type="hidden" name="id" value="${business.id}"></p>
    <p>新闻类型：<select name="cid">
        <c:forEach items="${businessClasses}" var="businessClass">
            <c:if test="${businessClass.id==business.cid}">
                <option value="${businessClass.id}" selected="selected">${businessClass.name}</option>
            </c:if>
            <c:if test="${businessClass.id!=business.cid}">
                <option value="${businessClass.id}">${businessClass.name}</option>
            </c:if>
        </c:forEach>
    </select>
    </p>
    <p>图片：<input type="text" name="img" value="${business.img}"></p>
    <p>标题：<input type="text" name="name" value="${business.name}"></p>
    <p>文章内容：<textarea name="desc"  style="width: 400px;height: 400px" >${business.desc}</textarea></p>
    <p>时间：<input type="text" name="time" value="${business.time}"></p>


    <button>提交</button>
</form>
</body>
</html>